import { IsEmail, IsOptional, IsString, MaxLength, MinLength, Matches } from 'class-validator';

export class UpdateUserDto {
  @IsOptional()
  @IsString({ message: '姓名必须是字符串' })
  @MaxLength(50, { message: '姓名长度不能超过50个字符' })
  name?: string;

  @IsOptional()
  @IsString({ message: '年龄必须是字符串' })
  @MaxLength(3, { message: '年龄长度不能超过3个字符' })
  age?: string;

  @IsOptional()
  @IsString()
  @MaxLength(100, { message: '地址长度不能超过100个字符' })
  location?: string;

  @IsOptional()
  @IsString()
  @MaxLength(500, { message: '个人简介长度不能超过500个字符' })
  bio?: string;

  @IsOptional()
  interests?: string[];
}